<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<link href="__PUBLIC__/admin/sncss/css/style.css" rel="stylesheet" type="text/css" />
<link href="__PUBLIC__/admin/sncss/css/combo.select.css" rel="stylesheet" type="text/css" />
<style>
#star2 img{ display:inline}
.star_all {width:150px; float: left;}
.newselect2{
  height:36px;
  line-height:36px;
  border:1px solid #c5c5c5;
  width: 400px;
}
</style>

</head>

<body>
	<div class="place">
	<span>位置：</span>
	<ul class="placeul">
	<li><a>首页</a></li>
	<li><a>订单管理</a></li>
	<li><a>订单详情</a></li>
	<li><a onClick="javascript:history.back(-1);">返回</a></li>
	</ul>
	</div>

	<div class="formbody">

	<div class="formtitle"><span>订单详情</span></div>
	<form id="formscore" name="formscore" method="post" action="/Home/Order/score_order" onsubmit="return form1_submit();">
	<ul class="forminfo">
	 <?php if(!empty($orderdata['audio_link'])){?>
	<li><label>交付的音频</label>
	<label><audio src="<?php echo $orderdata['audio_link'];?>" controls="controls">您的浏览器不支持 audio 标签。</audio></label><i></i>
	</li>
	<?php }?>
	<li>
	<input name="oid" id="oid" type="hidden" value="<?php echo $orderdata['id'];?>" />
	<input type="hidden"  value="0" id="score" name="score">
	<input type="hidden" value="{$jumpurl}" name="jumpurl">
	<label>请给出你的评分</label>
	<div class="star_all" id="scoremessage">
	<div id="star2"></div>
	<div id="result2"></div>
	</div>
	<li>
	<label>评价</label>
	<select class="newselect2" name="message" onchange="change(this)">
	<option value="就是任性，就是想评价，不需要理由">备选评价</option>
	<option value="继续努力">继续努力</option>
	<option value="音频质量达标">音频质量达标</option>
	</select>
	<br><br><textarea class="textinput" name="passmessage" id="passmessage"></textarea>
	</li>
	<br><br>
	<div style=" margin-left:10px;float: left;"><input type="submit" class="btn" value="确认评分"/></div>
	</form>
	</li>

	</ul>

	</div>

</body>
<script src="__PUBLIC__/admin/Js/jquery-1.7.2.min.js"></script>
<script src="__PUBLIC__/layer/layer.js"></script>
<!-- 评价 -->
<script src="__PUBLIC__/admin/Js/jquery.raty.js" type="text/javascript"></script>
<!-- 评价 -->
<script type="text/javascript">

rat('star1','result1',10);
rat('star2','result2',1);
function rat(star,result,m){

	star= '#' + star;
	result= '#' + result;
	$(result).hide();//将结果DIV隐藏

	$(star).raty({
		hints: ['1','2', '3', '4', '5'],
		path: "/Public/admin/Js",
		starOff: 'star-off-big.png',
		starOn: 'star-on-big.png',
		size: 24,
		start: 40,
		showHalf: true,
		target: result,
		targetKeep : true,//targetKeep 属性设置为true，用户的选择值才会被保持在目标DIV中，否则只是鼠标悬停时有值，而鼠标离开后这个值就会消失
		click: function (score, evt) {
			//第一种方式：直接取值
			//alert('你的评分是'+score*m+'分');
		}
	});

	//第二种方式可以设置一个隐蔽的HTML元素来保存用户的选择值，然后可以在脚本里面通过jQuery选中这个元素来处理该值。 弹出结果
	var text = $(result).text();
	$('img').click(function () {
		if ($(result).text() != text) {
			// alert($(result).text()/m);
			var score = $(result).text()/m;
			$('#score').val(score);
			return;
		}
	});
}
</script>
<script type="text/javascript">
	function form1_submit(){

	var score= $('#score').val();
	if(score == 0){
		layer.tips('请打分', '#scoremessage');return false;
	}
	layerload();
}
var change = function(sel){
		document.getElementById("passmessage").value = sel.value;
}
	function layerload(){
		layer.load(1, {shade: [0.8, '#393D49']});
	}
</script>
</html>
